package Singleton;
//饿汉模式
public class EagerSingleton {
    private static final EagerSingleton EagerSingletonEntity = new EagerSingleton();

    private EagerSingleton(){

    }

    public static EagerSingleton  getEntity(){
        return EagerSingletonEntity;
    }

    private String EnitityName;

    public String showEnitityHashCode(){
        return  Integer.toString(this.hashCode());
    }


    public String getEnitityName() {
        return EnitityName;
    }

    public void setEnitityName(String EnitityName) {
        this.EnitityName = EnitityName;
    }
}
